import request from '@/utils/request'

// 查询商品评论列表
export function listComment(data) {
  return request({
    url: '/sys/shopOrderComment/page',
    method: 'post',
    data: data
  })
}

// 隐藏
export function hidden(id) {
  return request({
    url: `/sys/shopOrderComment/${id}`,
    method: 'get'
  })
}

// 新增商品评论
export function addComment(data) {
  return request({
    url: '/sys/shopOrderComment/useradd',
    method: 'post',
    data: data
  })
}

// 回复评论
export function backComment(data) {
  return request({
    url: '/sys/shopOrderComment/add',
    method: 'post',
    data: data
  })
}

// 删除商品评论
export function delComment(id) {
  return request({
    url: `/sys/shopOrderComment/${id}`,
    method: 'delete'
  })
}
// 商品列表
export function products(data) {
  return request({
    url: `/sys/shopOrderComment/pageGoods`,
    method: 'post',
    data:data
  })
}
